import request from '../utils/request'

//搜索
export function getSearch(keywords, type = 1) {
  return request({
    url: 'search?keywords=' + keywords + '&type=' + type,
    method: 'get'
  })
}

// 默认搜索关键词
export function gerSearchDefault() {
  return request({
    url: 'search/default',
    method: "get"
  })
}

// 获取热门搜索列表
export function getSearchHot() {
  return request({
    url: 'search/hot/detail',
    method: "get"
  })
}

//搜索建议
export function getSearchSuggest(keywords) {
  return request({
    url: 'search/suggest?type=mobile&keywords=' + keywords,
    method: 'get'
  })
}

// 搜索多重匹配
export function getSearchMultimatch(keywords) {
  return request({
    url: 'search/multimatch?keywords=' + keywords,
    method: 'get'
  })
}
